CREATE TABLE [dbo].[tb_FuncionesDeGrilla]
(
[idFuncionGrilla] [int] NOT NULL IDENTITY(1, 1),
[Grilla] [int] NOT NULL,
[Funcion] [int] NOT NULL,
[Horas] [int] NOT NULL,
[CargoSalarial] [int] NOT NULL,
[Cantidad] [int] NOT NULL,
[Por] [int] NOT NULL,
[AlumnPorDocenteMin] [int] NULL,
[AlumnPorDocenteMax] [int] NULL,
[AlumnPorDocenteIdeal] [int] NULL,
[Jornada] [int] NOT NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_FuncionesDeGrilla] ADD CONSTRAINT [PK_tb_FuncionesDeGrilla] PRIMARY KEY NONCLUSTERED  ([idFuncionGrilla]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[tb_FuncionesDeGrilla] WITH NOCHECK ADD CONSTRAINT [FK_tb_FuncionesDeGrilla_tb_FuncionesLUI] FOREIGN KEY ([Funcion]) REFERENCES [dbo].[tb_Funciones] ([idFuncion])
GO
ALTER TABLE [dbo].[tb_FuncionesDeGrilla] WITH NOCHECK ADD CONSTRAINT [FK_tb_FuncionesDeGrilla_tb_GrillaFunciones] FOREIGN KEY ([Grilla]) REFERENCES [dbo].[tb_GrillaFunciones] ([idGrillaFuncion])
GO
ALTER TABLE [dbo].[tb_FuncionesDeGrilla] WITH NOCHECK ADD CONSTRAINT [FK_tb_FuncionesDeGrilla_tb_Jornadas] FOREIGN KEY ([Jornada]) REFERENCES [dbo].[tb_Jornadas] ([idJornada])
GO
ALTER TABLE [dbo].[tb_FuncionesDeGrilla] WITH NOCHECK ADD CONSTRAINT [FK_tb_FuncionesDeGrilla_tb_Criterios] FOREIGN KEY ([Por]) REFERENCES [dbo].[tb_Criterios] ([idCriterio])
GO
ALTER TABLE [dbo].[tb_FuncionesDeGrilla] NOCHECK CONSTRAINT [FK_tb_FuncionesDeGrilla_tb_GrillaFunciones]
GO
